public class Player implements Observer {

    public Player(String name){
        this.name = name;
    }
    private String name;
    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void help() {
        System.out.println(name+"：我已收到你的求助");
    }

    @Override
    public void beAttached(AllyControlCenter acc) {
        acc.notifyObserver(this.name);
    }
}
